/*
 * @Description: 资料库管理
 * @Author: Zzt
 * @Date: 2023-01-06 17:37:04
 * @LastEditTime: 2023-01-06 20:36:13
 */
import { lazy } from 'react';
import Layout from '@/layout';
import lazyLoad from '../components/lazyLoad';

// 档案类型配置
export const DatabaseArcType = lazy(
  () => import(/* webpackChunkName: "Database" */ '@/view/library/ArcType/ArcTypeMain')
);

// 元数据设置
export const DatabaseMetadata = lazy(
  () => import(/* webpackChunkName: "Database" */ '@/view/library/Metadata/MetadataMain')
);

// 元数据业务设置
export const DatabaseMetadataBusiness = lazy(
  () =>
    import(
      /* webpackChunkName: "Database" */ '@/view/library/MetadataBusiness/MetadataBusinessMain'
    )
);

// 开放字段设置
export const DatabaseOpening = lazy(
  () => import(/* webpackChunkName: "Database" */ '@/view/library/Opening/OpeningMain')
);

// 显示排序设置
export const DatabaseSorting = lazy(
  () => import(/* webpackChunkName: "Database" */ '@/view/library/Sorting/SortingMain')
);

// 映射关系设置
export const DatabaseMapping = lazy(
  () =>
    import(/* webpackChunkName: "Database" */ '@/view/library/MappingRelation/MappingRelationMain')
);

// 录入界面设置
export const DatabaseDesign = lazy(
  () => import(/* webpackChunkName: "Database" */ '@/view/library/DescDesign/DescDesignMain')
);

const DatabaseRoutes: any[] = [
  {
    path: '/database',
    element: <Layout />,
    meta: {
      title: '系统配置'
    },
    children: [
      {
        path: 'metadata',
        element: lazyLoad(DatabaseMetadata),
        meta: {
          title: '单位管理'
        }
      }
    ]
  }
];

export default DatabaseRoutes;
